// 表单字段类型定义
const FormDataType = [
    "number",   // id
    "number",   // parentId
    "string",   // name
    "number",   // type
    "string",   // path
    "string",   // component
    "string",   // perms
    "string",   // icon
    "number",   // sortValue
    "string",   // activeMenu
    "boolean",  // isHide
    "number",   // status
    "dateTime", // createTime
    "dateTime", // updateTime
    "number"    // isDeleted
];

// 表单默认数据
const FormData = {
    id: null,
    parentId: null,
    name: "",
    type: null,
    path: "",
    component: "",
    perms: "",
    icon: "",
    sortValue: null,
    activeMenu: "",
    isHide: false,
    status: null,
    createTime: null,
    updateTime: null,
    isDeleted: null
};

// 字段标签
const labels = {
    id: "编号",
    parentId: "所属上级",
    name: "名称",
    type: "类型",
    path: "路由地址",
    component: "组件路径",
    perms: "权限标识",
    icon: "图标",
    sortValue: "排序",
    activeMenu: "高亮的path",
    isHide: "是否隐藏",
    status: "状态",
    createTime: "创建时间",
    updateTime: "更新时间",
    isDeleted: "删除标记"
};

// 选项配置
const options = {
    type: [
        { value: 0, label: "目录" },
        { value: 1, label: "菜单" },
        { value: 2, label: "按钮" }
    ],
    status: [
        { value: 1, label: "正常" },
        { value: 0, label: "禁止" }
    ],
    isDeleted: [
        { value: 1, label: "可用" },
        { value: 0, label: "不可用" }
    ],
    isHide: [
        { value: true, label: "隐藏" },
        { value: false, label: "显示" }
    ]
};

// 统一导出配置
export const MenuPermissionFormConfig = {
    FormData,
    FormDataType,
    labels,
    options
};

